<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
        //使用解构赋值，实现两个变量的值的交换
        let a = 10;
        let b = 20;
        [b,a] = [a,b];
        console.log(a,b);
    </script>
  </body>
</html>
